package ru.vba.pojo;

public class Coordinate {
	private int posX;
	private int posY;
	public int getPosX() {
		return posX;
	}
	public int getPosY() {
		return posY;
	}
	public void setPosX(int posX) {
		this.posX = posX;
	}
	public void setPosY(int posY) {
		this.posY = posY;
	}
	@Override
	public boolean equals(Object other) {
		if (!(other instanceof Coordinate)){
			return false;
		}
		Coordinate coordinate = (Coordinate) other;
		return coordinate.getPosX() == posX && coordinate.getPosY() == posY;
	}
	@Override
	public int hashCode() {
		return (posX | 8 + posY | 8) * 17;
	}
}
